import {request} from "../../uilts/requests.ts";

// 创建新的试题
export function createNewTes(obj: any){
    return request({
        url: '/tesPaper/add',
        method: 'post',
        data: obj
    });
}

// 查询所有试题
export function allTesData() {
    return request({
        url: '/tesPaper/all',
        method: 'get',
    })
}

// 根据查询条件查询
export function queryTesData(obj: any) {
    return request({
        url: '/tesPaper/query',
        method: 'post',
        data: obj
    })
}

// 删除试题
export function deleteTes(id: Array<string>) {
    return request({
        url: '/tesPaper/delete',
        method: 'post',
        data: {id: id}
    })
}

// 更新试题
export function updateTes(obj: any) {
    return request({
        url: '/tesPaper/update',
        method: 'post',
        data: obj
    })
}